<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>


<script type="text/javascript" charset="utf-8">
	$( function() {
		$('#birthdate').datePicker( {
			startDate :'01/01/1930',
			endDate :(new Date()).asString()
		});
	});
</script>
<!-- Start of main content -->

<div id="content">
<div id="main-wrapper">


<h2 id="first"><bean:message key="editprofile.label.accountinfo"/></h2>



<p class="right"><span class="bullet"><a href="<c:url value="/frontoffice/view_profile.do"/>" title="View your user profile"><bean:message key="editprofile.label.view"/></a></span></p>


<div class="clearall"></div>


<html:form method="post" styleClass="standardform"
	action="/user/edit_profile">


	<fieldset><legend><bean:message key="editprofile.label.info"/></legend>

	<table class="formtable">

		<tbody>
		<tr><td><html:errors property="email" /></td></tr>
			<tr>
				<th><label for="user-email"><span class="required">*</span>
				<bean:message key="editprofile.label.email"/></label></th>

				<td>
					<html:text styleClass="textfield" property="email" styleId="email"
				value="${requestScope.user.email}" />
					</td>
			</tr>
			<tr><td><html:errors property="username" /></td></tr>
			<tr>
				<th><label><span class="required">*</span> User name:</label></th>
				<td>
				<html:text styleClass="textfield" property="username" styleId="username"
				value="${requestScope.user.username}" />
				</td>
				<td class="info"></td>
			</tr>

		</tbody>
	</table>

	</fieldset>

	<div class="clearall"></div>

	<fieldset><legend><bean:message key="editprofile.label.accountdetails"/></legend>

	<table class="formtable">

		<tbody>
		<tr><td><html:errors property="name" /></td></tr>
			<tr>
				<th><label for="full-name"><span class="required">*</span>
				<bean:message key="editprofile.label.name"/></label></th>
				<td>
					<html:text styleClass="textfield" property="name" styleId="name"
				value="${requestScope.user.name}" />
			</tr>

			<tr>
				<th><label for="born-day"><bean:message key="editprofile.label.birth"/></label></th>
				<td>
					<html:text styleClass="textfield" property="birthdate" styleId="birthdate"
				value="${requestScope.user.birthdate}" />
					</td>

				<td class="info"></td>
			</tr>

			<tr class="last">
				<th><label for="about-user"><bean:message key="editprofile.label.aboutyou"/></label></th>
				<td>
			<html:textarea styleClass="textfield" property="description" styleId="description"
				value="${requestScope.user.description}" />
</td>
				<td class="info"><bean:message key="editprofile.label.briefdescr"/></td>
			</tr>

		</tbody>
	</table>



	<table class="formtablesubmit">

		<tbody>
			<tr>
				<td><html:submit styleClass="img-btn"></html:submit></td>
				<td class="info"></td>
			</tr>

		</tbody>
	</table>


	</fieldset>
</html:form></div>
<!-- Closes #content --></div>
<!-- Closes #wrapper -->

